package liyan.shi.springbootdemo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

//这个类的所有方法返回的数据封装到响应中,对象转换为json数据
//@ResponseBody
//@Controller
@RestController
public class HelloController {

    @RequestMapping("/helloWorld")
    public String hello(){
        return "Hello World!";
    }

}
